<#assign domain="${ctx.contextPath}" />
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="x-ua-compatible" content="IE=Edge, chrome=1"/>
	<meta name="renderer" content="webkit">
	<title>scoreCard2</title>
		<link rel="stylesheet" href="${domain}/static/css/common/bootstrap.min.css">
	<link rel="stylesheet" href="${domain}/static/css/common/base.css">
	<link rel="stylesheet" href="${domain}/static/css/common/header.css">
	<link rel="stylesheet" href="${domain}/static/css/antiFraud.css">
	<script src="${domain}/static/js/jquery-3.2.1.slim.min.js"></script>
	<script src="${domain}/static/js/bootstrap.min.js"></script
	<script src="${domain}/static/js/jquery-3.2.1.min.js"></script>
	<script src="${domain}/static/js/bootstrap.min.js"></script>
	 <link rel="stylesheet" href="${domain}/static/css/bootstrap.css">
	  <link rel="stylesheet" href="${domain}/static/css/bootstrapValidator.css">
	 <script src="${domain}/static/js/bootstrapValidator.js"></script>

</head>

<div class="content">
		<!--侧边导航-->
		<!--反欺诈内容-->
		<div class="anti-fraud">
			<div class="wrap">
				   <form id="defaultForm" method="post" class="form-horizontal" action="${domain}/gjj/getGs">
                             <h1>社保公积金查询</h1>
                            <div class="form-group">
							<select class="form-control" name="type" id="type">
							<option value="GJJ">公积金</option>
					        <option value="SHE_BAO">社保</option>
							</select>
						</div>
						
						 <div class="form-group">
							<select class="form-control" name="province" id="province">
						<option value="">请选择</option>
							</select>
						</div>
                            
                          <div class="form-group">
							<select class="form-control" name="city" id="city">
							<option value="">请选择</option>
							</select>
						</div>
                            
                     <div class="form-group">
						<input type="text" class="form-control" placeholder="姓名" name="realName" id="realName" value="${USER_SCORE.name}" readonly="readonly">
					</div>
					<div class="form-group">
						<input type="text" class="form-control" placeholder="手机号" name="userMobile" id="userMobile" readonly="readonly" value="${USER_SCORE.phone}">
					</div>
					
					<div class="form-group">
						<input type="text" class="form-control" placeholder="身份证号" name="identityCode" id="identityCode" readonly="readonly" value="${USER_SCORE.idNumber}">
					</div>
					
					<div class="form-group">
						<input type="text" class="form-control" placeholder="用户名" name="userName" id="userName">
						<input type="hidden" class="form-control" placeholder="用户名" name="id" id="id" value="${id}">
							<input type="hidden" value="${ctx.contextPath}" id="domain_id"/>
					</div>
					<div class="form-group">
						<input type="password" class="form-control" placeholder="密码" name="userPass" id="userPass">
					</div>

                         
<div name="signup">
           <button type="submit" class="btn btn-primary" data-loading-text="Loading..." autocomplete="off" onclick="loag()" id="btn_login" style="width:300px;margin:0 auto;display:block;">查询</button>
</div>



                    </form>
			</div>
		</div>
	</div>
	
<script src="../static/js/area.js"></script>
<script src="../static/js/select.js"></script>

<script>

function loag() {
$.ajax({
                cache: true,
                type: "POST",
                url:"../antifraud/cost",
                data:{type:$("#type").val()},// 你的formid
                async: false,
                error: function(request) {
                },
                success: function(data) {
                if(data=='1'){
                  $("#btn_login").attr("type","");
                alert("余额不足！请联系客服！");
                }else{
                var flag = $("#defaultForm").data("bootstrapValidator").isValid();
     if(flag==true){
      var btn = $("#btn_login");
      btn.text('加载中......');
      }
                }
                }
 })

    }


 $(document).ready(function() {
    $('#defaultForm').bootstrapValidator({
        message: 'This value is not valid',
        feedbackIcons: {
            valid: 'glyphicon glyphicon-ok',
            invalid: 'glyphicon glyphicon-remove',
            validating: 'glyphicon glyphicon-refresh'
        },
        fields: {
            type: {
                group: '.form-group',
                validators: {
                    notEmpty: {
                        message: '请输入查询类型'
                    },
                        stringLength: {/*长度提示*/
                            min: 1,
                            max: 30,
                            message: '输入长度过长'
                        }
                }
            },
        province: {
                group: '.form-group',
                validators: {
                    notEmpty: {
                        message: '请输入查询省'
                    },
                        stringLength: {/*长度提示*/
                            min: 1,
                            max: 18,
                            message: '请输入11位数字'
                        }
                }
            },
          city: {
                group: '.form-group',
                validators: {
                    notEmpty: {
                        message: '请输查询城市'
                    },
                    stringLength: {
                            min: 1,
                            max: 15,
                            message: '请输入正确验证码'
                        }
                }
            },
             realName: {
                group: '.form-group',
                validators: {
                    notEmpty: {
                        message: '请输入姓名'
                    },
                        stringLength: {/*长度提示*/
                            min: 1,
                            max: 10,
                            message: '输入长度过长'
                        }
                }
            },
        userMobile: {
                group: '.form-group',
                validators: {
                    notEmpty: {
                        message: '请输入手机号'
                    },
                       regexp: {/* 只需加此键值对，包含正则表达式，和提示 */
                            regexp: /^[0-9_\.]+$/,
                            message: '只能是数字和字母_.'
                        },
                        stringLength: {/*长度提示*/
                            min: 11,
                            max: 11,
                            message: '请输入11位数字'
                        }
                }
            },
          identityCode: {
                group: '.form-group',
                validators: {
                    notEmpty: {
                        message: '请输入身份证号'
                    },
                    regexp: {/* 只需加此键值对，包含正则表达式，和提示 */
                            regexp: /^[a-zA-Z0-9_\.]+$/,
                            message: '请输入正确格式'
                        },
                    stringLength: {/*长度提示*/
                            min: 15,
                            max: 20,
                            message: '请输入正确身份证号'
                        }
                }
            },
            userName: {
                group: '.form-group',
                validators: {
                    notEmpty: {
                        message: '请输入用户名'
                    },
                        stringLength: {/*长度提示*/
                            min: 1,
                            max: 30,
                            message: ''
                        }
                }
            },
            userPass: {
                group: '.form-group',
                validators: {
                    notEmpty: {
                        message: '请输入密码'
                    },
                        stringLength: {
                            min: 1,
                            max: 30,
                            message: ''
                        }
                }
            },
          
        }
    });

});
</script>
</body>
</html>